use std::fmt::{Debug, Display, Formatter};
use std::io::{Write};
use std::error::Error;
use std::str::FromStr;

pub mod cmd;
pub mod version;
pub mod plugin;
pub mod error;
pub mod types;
pub mod convertion;

// pub trait PluginInfo {
//     fn support_versions(&self) -> Vec<String>;
//     fn encode<W>(&self,w:W) -> Result<(),Box<dyn Error>> where W:Write;
// }


#[cfg(test)]
mod test {
    use std::error::Error;
    use crate::lincni::error::Errors;

    fn err() -> Result<(),Box<dyn Error>> {
        Err(Errors::Empty.to_dyn())
    }

    #[test]
    fn test () {
        let res = err();
        match res {
            Ok(_) => {}
            Err(e) => {println!("{}",e)}
        }
    }
}